<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../ajax/jquery-3.4.1.min.js"></script>
</head>
<body>
    <div id="gai">
        <input type="text" placeholder="请输入手机号" id="phone"><br>
        <input type="password" placeholder="请输入旧密码" id="password"><br>
        <input type="password" placeholder="请输入新密码" id="newPassword1"><br>
        <input type="password" placeholder="确认新密码" id="confirmPassword"><br>
        <button id="gia" onclick="a()">修改</button>
    </div>
    <script>
        function a() {
            $.ajax({
                url: "http://172.16.106.87:8080/updataPwd",
                type: "get",
                data: {
                    phone: $("#phone").val(),
                    oldpassword: $("#password").val(),
                    newPassword: $("#newPassword1").val(),
                    confirmPassword: $("#confirmPassword").val(),
                },
                success: function (awm) {
                    alert(awm)
                    alert(awm.message);
                    
                }
            })
        }
    </script>
</body>
</html>